package com.hgw.Demo07_ObserverPattern.Exercises22_9_5;

/**
 * Data time:2021/12/19 18:13
 * StudentID:2019112118
 * Author:hgw
 * Description: 学生类
 */
public class Student implements People{
    private String name;

    public Student(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void ChangeName(AbstractDepartment ad) {
        System.out.println("系：" + ad.getDepartmentName() +"学生："+this.name);
    }

}
